package ee.project.redblacktree;

// Basic node stored in red-black trees
// Note that this class is not accessible outside
// of package DataStructures

public class RedBlackNode {
	// Constructors
	public RedBlackNode(Comparable theElement) {
		this(theElement, null, null);
	}

	public RedBlackNode(Comparable theElement, RedBlackNode lt, RedBlackNode rt) {
		element = theElement;
		left = lt;
		right = rt;
		color = RedBlackTree.BLACK;
	}

	// Friendly data; accessible by other package routines
	RedBlackNode parent;
	Comparable element; // The data in the node
	RedBlackNode left; // Left child
	RedBlackNode right; // Right child
	int color; // Color
}
